f1='patient.dbf'
f2='new_pat.dbf'
f3='pro_pat.dbf'
f4='in_pat.dbf'
f5='pat_hl.dbf'
f6='act_pat.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
IF FILE("&DR1&F6")
   use &dr1&f6
   if fil_lock(0)
      copy to &DR3&f6
   endif
   unlock
ENDIF
clos data
f1='drugs.dbf'
f2='dispos.dbf'
f3='company.dbf'
f4='supplier.dbf'
f5='doctors.dbf'
f6='medic_pr.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
IF FILE("&DR1&F6")
   use &dr1&f6
   if fil_lock(0)
      copy to &DR3&f6
   endif
   unlock
ENDIF
clos data
f1='activity.dbf'
f2='revenue.dbf'
f3='doct_fee.dbf'
f4='act_proc.dbf'
f5='act_phar.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
clos data

f1='act_ytd.dbf'
f2='revenuey.dbf'
f3='doct_ytd.dbf'
f4='act_proy.dbf'
f5='act_phay.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
clos data

f1='activitv.dbf'
f2='revenuev.dbf'
f3='doct_fev.dbf'
f4='act_prov.dbf'
f5='act_phav.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
clos data
            
f1='dlv_phar.dbf'
f2='cred.dbf'
f3='trn_disp.dbf'
f4='ord_drug.dbf'
f5='ord_disp.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
clos data
f1='int_drug.dbf'
f2='int_disp.dbf'
f3='drug_ent.dbf'
f4='disp_ent.dbf'
f5='ctrprn.dbf'
f6='pati.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
IF FILE("&DR1&F6")
   use &dr1&f6
   if fil_lock(0)
      copy to &DR3&f6
   endif
   unlock
ENDIF
clos data
f1='pur_disp.dbf'
f2='pur_drug.dbf'
f3='pur_spec.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   If fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
clos data
f1='employee.dbf'
f2='family.dbf'
f3='intercom.dbf'
f4='aeacorp.dbf'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
clos data
F1='PHYPAT.DBF'
F2='PHYCLASS.DBF'
F3='PHYDEF.DBF'
F4='PHYCOURS.DBF'
F5='PHYOPEN.DBF'
IF FILE("&DR1&F1")
   use &dr1&f1
   if fil_lock(0)
      copy to &DR3&f1
   endif
   unlock
ENDIF
IF FILE("&DR1&F2")
   use &dr1&f2
   if fil_lock(0)
      copy to &DR3&f2
   endif
   unlock
ENDIF
IF FILE("&DR1&F3")
   use &dr1&f3
   if fil_lock(0)
      copy to &DR3&f3
   endif
   unlock
ENDIF
IF FILE("&DR1&F4")
   use &dr1&f4
   if fil_lock(0)
      copy to &DR3&f4
   endif
   unlock
ENDIF
IF FILE("&DR1&F5")
   use &dr1&f5
   if fil_lock(0)
      copy to &DR3&f5
   endif
   unlock
ENDIF
clos data
f1='pati.mem'
f2='vislab.mem'
f3='visit.mem'
f4='report.mem'
f5='monthrev.mem'
f6='monthact.mem'
IF FILE("&DR1&F1")
   Copy file &dr1&f1 to &DR3&f1
ENDIF
IF FILE("&DR1&F2")
   copy file &dr1&f2 to &DR3&f2
ENDIF
IF FILE("&DR1&F3")
   copy file &dr1&f3 to &DR3&f3
ENDIF
IF FILE("&DR1&F4")
   copy file &dr1&f4 to &DR3&f4
ENDIF
IF FILE("&DR1&F5")
   copy file &dr1&f5 to &DR3&f5
ENDIF
IF FILE("&DR1&F6")
   copy file &dr1&f6 to &DR3&f6
ENDIF
CLOS ALL
f1='DELNUM.mem'
f2='PROPAT.mem'
f3='COMPAN.mem'
f4='CLITRA.mem'
f5='INTTRA.mem'
f6='PURORD.mem'
F7='CTRPRN.MEM'
IF FILE("&DR1&F1")
   Copy file &dr1&f1 to &DR3&f1
ENDIF
IF FILE("&DR1&F2")
   copy file &dr1&f2 to &DR3&f2
ENDIF
IF FILE("&DR1&F3")
   copy file &dr1&f3 to &DR3&f3
ENDIF
IF FILE("&DR1&F4")
   copy file &dr1&f4 to &DR3&f4
ENDIF
IF FILE("&DR1&F5")
   copy file &dr1&f5 to &DR3&f5
ENDIF
IF FILE("&DR1&F6")
   copy file &dr1&f6 to &DR3&f6
ENDIF
IF FILE("&DR1&F7")
   copy file &dr1&f7 to &DR3&f7
ENDIF
CLOS ALL
return

